-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python bindings initial feature set #602
Open
smartgoo
wants to merge
48
commits into
kaspanet:master
Choose a base branch
from
aspectron:python
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Prototype of WASM/Python bindings * Updated note * Cargo.toml merge * Note update * Address, PrivateKey, PublicKey wasm/py protos * rpc, dir rename * lints
* kaspa-python-macros * cleanup + rename 'inner' to 'client'
* Python dictionary for request and response * readme update * to_keypair block moves
* change python package name to 'kaspa' * Introduce Py wRPC client wrapping Inner struct that contains KaspaRpcClient * scaffolding for Python wRPC client Inner struct * Python wRPC subscribtions prototype * Python wRPC subscription callback args/kwargs * lint * minor refactor, handling of UTXO change notification * properly gate python code in kaspa-rpc-core * Attempt to fix test suite CI failure * Subscribe UTXOs Changed * subscriptions * wRPC client disconnect * unregister callbacks * fix failing kaspad build
* wRPC minor cleanup * resolver scaffolding * wRPC client failing to init due to resolver network issue * wRPC client constructor accept Resolver, network id * network null when using url * connect options and resolver methods * lints * rpc.py example tn11 * set network id on client * bubble errors where possible * lint
* Feat: adding pyi file and testing first commit * Feat: Added py interface file * fix python IDE autocompletion and imports
* Expose Keypair struct to Python * PublicKeyGenerator * XPub and XPrv * DerivationPath * python method names * PrivateKey to_hex method impl * Address Python method restructure * PY-NOTE comment clean up * addresses example usage from Python * pyi file * clippy failures due to 1.80
* Prototype of WASM/Python bindings * Updated note * Cargo.toml merge * Note update * Address, PrivateKey, PublicKey wasm/py protos * rpc, dir rename * lints
* kaspa-python-macros * cleanup + rename 'inner' to 'client'
* Python dictionary for request and response * readme update * to_keypair block moves
* change python package name to 'kaspa' * Introduce Py wRPC client wrapping Inner struct that contains KaspaRpcClient * scaffolding for Python wRPC client Inner struct * Python wRPC subscribtions prototype * Python wRPC subscription callback args/kwargs * lint * minor refactor, handling of UTXO change notification * properly gate python code in kaspa-rpc-core * Attempt to fix test suite CI failure * Subscribe UTXOs Changed * subscriptions * wRPC client disconnect * unregister callbacks * fix failing kaspad build
* wRPC minor cleanup * resolver scaffolding * wRPC client failing to init due to resolver network issue * wRPC client constructor accept Resolver, network id * network null when using url * connect options and resolver methods * lints * rpc.py example tn11 * set network id on client * bubble errors where possible * lint
* Feat: adding pyi file and testing first commit * Feat: Added py interface file * fix python IDE autocompletion and imports
* Expose Keypair struct to Python * PublicKeyGenerator * XPub and XPrv * DerivationPath * python method names * PrivateKey to_hex method impl * Address Python method restructure * PY-NOTE comment clean up * addresses example usage from Python * pyi file * clippy failures due to 1.80
Python 0.15.2
* XPrv additional methods to match WASM * XPub additional methods to match WASM * Address getters * PrivateKeyGenerator * Keypair * Resolver * .pyi file * Python wRPC client examples * transaction submission, wRPC dict -> Request conversion * rebase * transaction example update * wallet duplicate py blocks
* Python ScriptBuilder * address_from_script_public_key py util fn * remove unused * tx examples * .pyi file * script builder comment * lint
* generator checkpoint * generator checkpoint * bug fixes * krc20 deploy comment * .pyi * rust 1.82 * krc20 deploy example cleanup
* kaspa-python-core and pybinary * ScriptBuilder use PyBinary * ScriptPublicKey constructor PyBinary * Transaction PyBinary * TransactionInput PyBinary * Generator, PendingTransaction PyBinary * create_transaction payload type * example clean up
* NetworkId, NetworkType interface cleanup * .pyi upate
* derivation example and required bug fixes * clean/bug fix existing examples
* Python wallet message signing * message signing example * .pyi
* tx mass wallet fns * .pyi * fmt
* estimate transaction * generator example * simple_transaction file name * single_transaction file name
* cargo updates * migration to 0.22.5 and py-async-runtimes * ScriptBuilder &Bound<T> * PyUtxoEntries generator & utils * PyOutputs generator & utils * lints and cleanup
* signers * lint * remove comment * remove comment
* String vs. &str * result type and bubble where possible * rpc result type, subscription callback print stack trace * pubkey
* module add * lints * pyi
* bindings dir for python * rpc/wrpc/wasm -> rpc/wrpc/bindings/wasm * wallet/core/src/wasm -> wallet/core/src/bindings/wasm/ * crypto/txscript/src/wasm -> crypto/txscript/src/bindings/wasm * rpc/core/src/wasm -> rpc/core/src/bindings/wasm
* PaymentDestination::Change in Generator * py-note cleanup * comment clean up * example cleanup * cleanup * lint
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Python Bindings for Rusty Kaspa - using PyO3 and Maturin to build a native Python extension module named
kaspa
.This initial version exposes wRPC Client, transaction creation, and key management functionality to Python.
WASM interface is mirrored as much as possible.
Added workspace member crates:
kaspa-python
- main entry point for building Python package, and example usage from Pythonkaspa-python-core
- custom types used for Python interfacekaspa-python-macros
kaspa-wrpc-python
- Python wRPC clientAdded external dependencies:
pyo3
,pyo3-async-runtimes
,serde-pyobject
A (very) high-level overview of bindings:
py-sdk
. This feature was added to multiple existing RK crates.#[pyclass]
.#[pymethods]
.#[pyfunction]
.python
andwasm
directories exist at same level, createdbindings
directory and moved both under that directory.CI: